package com.qys.livesMall.app.user.model.vo.sys;

import com.qys.livesMall.app.user.model.dto.sys.SysAppUserSaveDTO;
import com.qys.livesMall.app.user.model.entity.H2AppUserAddress;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * Created by IntelliJ IDEA.
 * User: dp
 * Date: 2023/04/25
 * Time: 9:29
 * DESCRIPTION:
 */
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public class SysAppUserVo extends SysAppUserSaveDTO implements Serializable {
    private static final long serialVersionUID = 42L;

    public SysAppUserVo(H2AppUserAddress userAddress) {
        this.setCountry(userAddress.getCountry());
        this.setCountryName(userAddress.getCountryName());
        this.setUserName(userAddress.getUserName());
        this.setPostalCode(userAddress.getPostalCode());
        this.setEmail(userAddress.getEmail());
        this.setAddress(userAddress.getAddress());
    }
}
